// 封装倒计时
var CountDown = /** @class */ (function () {
    function CountDown(params) {
        this.endtime = params.endtime;
        this.wrapper = params.wrapper;
        this.onGoing();
    }
    CountDown.prototype.onGoing = function () {
        var _this = this;
        // 定时器进行倒计时
        setInterval(function () {
            var curTime = Date.now();
            var endTime = new Date(_this.endtime).getTime();
            var diffTime = endTime - curTime;
            var day = new Date(diffTime).getDate();
            var hours = new Date(diffTime).getHours();
            var min = new Date(diffTime).getMinutes();
            var sec = new Date(diffTime).getSeconds();
            _this.wrapper.innerHTML = "\n                ".concat(day, "\u5929").concat(hours, "\u65F6").concat(min, "\u5206").concat(sec, "\u79D2\n            ");
        }, 1000);
    };
    return CountDown;
}());
new CountDown({
    endtime: '2022/2/28',
    wrapper: document.getElementById('box')
});
